package com.zz.framework.core.base

import android.view.View
import android.widget.LinearLayout
import com.zz.framework.R
import com.zz.framework.core.adapter.BaseViewHolder
import kotlin.properties.Delegates

/**
 * Copyright © 2020 zanezhao All rights reserved.
 * Created on 2020/3/20 4:23 PM.
 * @version: V1.0
 */
open class BaseConfigFragment: BaseViewModelFragment() {
    var mLinearLayout:LinearLayout by Delegates.notNull()
    var mLlContent:LinearLayout by Delegates.notNull()
    protected var mHolders: ArrayList<BaseViewHolder> = arrayListOf()

    protected open fun addHolder(mHolder: BaseViewHolder) {
        mHolders.add(mHolder)
    }

    override fun onInitAttribute(ba: BaseAttribute) {
        super.onInitAttribute(ba)
        ba.mContentLayoutId= R.layout.fragment_config_layout
    }

    override fun initView(view: View) {
        super.initView(view)
        mLinearLayout = view.findViewById(R.id.mLinearLayout)
        mLlContent = view.findViewById(R.id.mLlContent)
    }
}